package com.app.service;

import java.util.List;
import javax.annotation.Resource;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;
import com.app.entity.Answer;
import com.app.mapper.AnswerDAO;

@Service
public class AnswerServiceImpl implements AnswerService {
    @Resource
    AnswerDAO answerDao;

    public List<Answer> getAnswerPager(@Param("skip") int skip, @Param("size") int size) {
        return answerDao.getAnswerPager(skip, size);
    }

    public Answer getAnswerById(int id) {
        return answerDao.getAnswerById(id);
    }

    public int getAnswerCount() {
        return answerDao.getAnswerCount();
    }

    public int insert(Answer entity) {
        return answerDao.insert(entity);
    }

    public int delete(int id) {
        return answerDao.delete(id);
    }

    public int update(Answer entity) {
        return answerDao.update(entity);
    }

    public List<Answer> getAllAnswer() {
        return answerDao.getAllAnswer();
    }

    public List<Answer> getByQid(int qid) {
        // TODO Auto-generated method stub
        return answerDao.getByQid(qid);
    }

}
